const WebpackDevServer=require('webpack-dev-server');
const config=require('../webpack.config');
const webpack = require('webpack');
const path=require('path');
const compiler=webpack(config);
let server=new WebpackDevServer(compiler,{
	contentBase: path.join(__dirname,'../build'),
	port: 8081,
	clientLogLevel: 'warning',
	stats: {colors: true},
	publicPath: '/',
	headers: {
		"Access-Control-Allow-Origin":"*"
	}
});
compiler.hooks.done.tap('',function () {
	console.log('编译完成!');
});
